/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package de.editura.oxygen.severin.imageviewer.features.knownDatamodels;

import java.util.List;

/**
 *
 * @author kschmidtner
 */
public class ImageRefFieldCntrllr {

    public static ImageRefField getImgFileField(List<ImageRefField> imgRefs ) {
        ImageRefField imgRef = null;
        for (ImageRefField imageRefField : imgRefs) {
            if (imageRefField.getFileType() == ImageRefFileTypes.FILE) {
                return imageRefField;
            }
        }
        return imgRef;
    }

    public static ImageRefField getImgDirField(List<ImageRefField> imgRefs ) {
        ImageRefField imgRef = null;
        for (ImageRefField imageRefField : imgRefs) {
            if (imageRefField.getFileType() == ImageRefFileTypes.DIR) {
                return imageRefField;
            }
        }
        return imgRef;
    }

}
